package com.quizzer.system.dto.question.category;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 分类添加 DTO
 * 用于添加小类别
 *
 * @author rong
 * @date 2025/10/7 18:11
 */
@Data
@ApiModel(description = "小分类添加 DTO")
public class CategoryAddDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "所属大类别ID", required = true, example = "100")
    @NotNull(message = "所属大类别ID不能为空")
    private Long subjectId;

    @ApiModelProperty(value = "小类别名称，例如集合、IO", required = true, example = "集合")
    @NotBlank(message = "小类别名称不能为空")
    private String name;

    @ApiModelProperty(value = "小类别描述", example = "集合相关题目分类")
    private String description;

    @ApiModelProperty(value = "排序字段，数值越小越靠前", example = "1")
    private Integer sort;
}
